home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 1 / CU Amiga Magazine CD-ROM Special Edition (1995)(EMAP Images)(GB)[Issue 1995-11].iso / Aminet / comm / tcp / ATCP_sdk_40_gc.lha / AmiTCP-4.0-gcc / netinclude / rpcsvc / spray.x < prev    next >
Text File  |  1995-04-07  |  969b  |  57 lines

  1. /* @(#)spray.x    2.1 88/08/01 4.0 RPCSRC */
  2. /* @(#)spray.x 1.2 87/09/18 Copyr 1987 Sun Micro */
  3.  
  4.  
  5. /*
  6.  * Spray a server with packets
  7.  * Useful for testing flakiness of network interfaces
  8.  */
  9.  
  10. const SPRAYMAX = 8845;    /* max amount can spray */
  11.  
  12. /*
  13.  * GMT since 0:00, 1 January 1970
  14.  */
  15. struct spraytimeval {
  16.     unsigned int sec;
  17.     unsigned int usec;
  18. };
  19.  
  20. /*
  21.  * spray statistics
  22.  */
  23. struct spraycumul {
  24.     unsigned int counter;
  25.     spraytimeval clock;
  26. };
  27.  
  28. /*
  29.  * spray data
  30.  */
  31. typedef opaque sprayarr<SPRAYMAX>;
  32.  
  33. program SPRAYPROG {
  34.     version SPRAYVERS {
  35.         /*
  36.          * Just throw away the data and increment the counter
  37.          * This call never returns, so the client should always 
  38.          * time it out.
  39.          */
  40.         void
  41.         SPRAYPROC_SPRAY(sprayarr) = 1;
  42.  
  43.         /*
  44.          * Get the value of the counter and elapsed time  since
  45.          * last CLEAR.
  46.          */
  47.         spraycumul    
  48.         SPRAYPROC_GET(void) = 2;
  49.  
  50.         /*
  51.          * Clear the counter and reset the elapsed time
  52.          */
  53.         void
  54.         SPRAYPROC_CLEAR(void) = 3;
  55.     } = 1;
  56. } = 100012;
  57.